﻿using System.ServiceProcess;

namespace CodeflowsHost
{
    public abstract class CustomServiceBase : ServiceBase
    {
        protected override void OnStart(string[] args)
        {      
            Start();     
        }

        protected override void OnStop()
        {
            Stop();
        }

        void InitializeComponent()
        {
            ServiceName = GetServiceName();
        }

        public abstract void Start();
        public abstract void Stop();
        protected abstract string GetServiceName();
    }
}